
import java.io.*;
import java.util.*;

public class Start {

    public static void main(String[] args) throws FileNotFoundException, IOException {

        ReadFile systemFile = new ReadFile(new File("system.properties")); // read in file and get system info
        int numConnections = systemFile.getNumConnections();
        String[] name = new String[numConnections];
        String[] location = new String[numConnections];
        name = systemFile.getName();
        location = systemFile.getLocation();

        // get current path
        String path = System.getProperty("user.dir");
        
        // start clients
        for(int i=0; i<numConnections; i++){
        System.out.println("Starting " + name[i]);
        Runtime.getRuntime().exec("ssh " + location[i] + " ; cd " + path + " ; java SecurityTwo " + i); 
        }
    }
}
